home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / pc / DirectX SDK / DXSDK / samples / Multimedia / VBSamples / DirectShow / Editing / DexterVB / frmAbout.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2001-10-08  |  9.3 KB  |  228 lines

  1. VERSION 5.00
  2. Begin VB.Form frmAbout 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "About Dexter VB Sample"
  5.    ClientHeight    =   3555
  6.    ClientLeft      =   60
  7.    ClientTop       =   345
  8.    ClientWidth     =   5730
  9.    ClipControls    =   0   'False
  10.    Icon            =   "frmAbout.frx":0000
  11.    LinkTopic       =   "Form2"
  12.    LockControls    =   -1  'True
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   2453.724
  16.    ScaleMode       =   0  'User
  17.    ScaleWidth      =   5380.766
  18.    ShowInTaskbar   =   0   'False
  19.    StartUpPosition =   1  'CenterOwner
  20.    Begin VB.PictureBox picIcon 
  21.       AutoSize        =   -1  'True
  22.       ClipControls    =   0   'False
  23.       Height          =   540
  24.       Left            =   240
  25.       Picture         =   "frmAbout.frx":030A
  26.       ScaleHeight     =   337.12
  27.       ScaleMode       =   0  'User
  28.       ScaleWidth      =   337.12
  29.       TabIndex        =   1
  30.       Top             =   240
  31.       Width           =   540
  32.    End
  33.    Begin VB.CommandButton cmdOK 
  34.       Cancel          =   -1  'True
  35.       Caption         =   "OK"
  36.       Default         =   -1  'True
  37.       Height          =   345
  38.       Left            =   4245
  39.       TabIndex        =   0
  40.       Top             =   2625
  41.       Width           =   1260
  42.    End
  43.    Begin VB.CommandButton cmdSysInfo 
  44.       Caption         =   "&System Info..."
  45.       Height          =   345
  46.       Left            =   4260
  47.       TabIndex        =   2
  48.       Top             =   3075
  49.       Width           =   1245
  50.    End
  51.    Begin VB.Line Line1 
  52.       BorderColor     =   &H00808080&
  53.       BorderStyle     =   6  'Inside Solid
  54.       Index           =   1
  55.       X1              =   84.515
  56.       X2              =   5309.398
  57.       Y1              =   1687.583
  58.       Y2              =   1687.583
  59.    End
  60.    Begin VB.Label lblDescription 
  61.       Caption         =   "Copyright (C) 1999-2001 Microsoft Corporation"
  62.       ForeColor       =   &H00000000&
  63.       Height          =   1170
  64.       Left            =   1050
  65.       TabIndex        =   3
  66.       Top             =   825
  67.       Width           =   3885
  68.    End
  69.    Begin VB.Label lblTitle 
  70.       Caption         =   "VB Dexter Sample Application"
  71.       ForeColor       =   &H00000000&
  72.       Height          =   255
  73.       Left            =   1050
  74.       TabIndex        =   5
  75.       Top             =   240
  76.       Width           =   3885
  77.    End
  78.    Begin VB.Line Line1 
  79.       BorderColor     =   &H00FFFFFF&
  80.       BorderWidth     =   2
  81.       Index           =   0
  82.       X1              =   98.6
  83.       X2              =   5309.398
  84.       Y1              =   1697.936
  85.       Y2              =   1697.936
  86.    End
  87.    Begin VB.Label lblVersion 
  88.       Caption         =   "Version 1.0"
  89.       Height          =   225
  90.       Left            =   1050
  91.       TabIndex        =   6
  92.       Top             =   525
  93.       Width           =   3885
  94.    End
  95.    Begin VB.Label lblDisclaimer 
  96.       Caption         =   "Warning: You must have DX8 or newer."
  97.       ForeColor       =   &H00000000&
  98.       Height          =   825
  99.       Left            =   255
  100.       TabIndex        =   4
  101.       Top             =   2625
  102.       Width           =   3870
  103.    End
  104. Attribute VB_Name = "frmAbout"
  105. Attribute VB_GlobalNameSpace = False
  106. Attribute VB_Creatable = False
  107. Attribute VB_PredeclaredId = True
  108. Attribute VB_Exposed = False
  109. '*******************************************************************************
  110. '*       This is a part of the Microsoft DXSDK Code Samples.
  111. '*       Copyright (C) 1999-2001 Microsoft Corporation.
  112. '*       All rights reserved.
  113. '*       This source code is only intended as a supplement to
  114. '*       Microsoft Development Tools and/or SDK documentation.
  115. '*       See these sources for detailed information regarding the
  116. '*       Microsoft samples programs.
  117. '*******************************************************************************
  118. Option Explicit
  119. Option Base 0
  120. Option Compare Text
  121.             
  122.             
  123. ' **************************************************************************************************************************************
  124. ' * PRIVATE INTERFACE- FORM EVENT HANDLERS
  125.             ' ******************************************************************************************************************************
  126.             ' * procedure name: Form_Load
  127.             ' * procedure description:  Occurs when a form is loaded.
  128.             ' *
  129.             ' ******************************************************************************************************************************
  130.             Private Sub Form_Load()
  131.             On Local Error GoTo ErrLine
  132.             Me.Caption = "About " & App.Title: lblTitle.Caption = App.Title
  133.             lblVersion.Caption = "Version " & CStr(App.Major) & "." & CStr(App.Minor) & "." & CStr(App.Revision)
  134.             Exit Sub
  135.             
  136. ErrLine:
  137.             Err.Clear
  138.             Exit Sub
  139.             End Sub
  140.             
  141.             
  142.             ' ******************************************************************************************************************************
  143.             ' * procedure name: Form_QueryUnload
  144.             ' * procedure description:  Occurs before a form or application closes.
  145.             ' *
  146.             ' ******************************************************************************************************************************
  147.             Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  148.             On Local Error GoTo ErrLine
  149.             
  150.             Select Case UnloadMode
  151.                 Case vbFormControlMenu
  152.                          '0 The user chose the Close command from the Control menu on the form.
  153.                 Case vbFormCode
  154.                          '1 The Unload statement is invoked from code.
  155.                 Case vbAppWindows
  156.                          '2 The current Microsoft Windows operating environment session is ending.
  157.                 Case vbAppTaskManager
  158.                          '3 The Microsoft Windows Task Manager is closing the application.
  159.                          End
  160.                 Case vbFormMDIForm
  161.                          '4 An MDI child form is closing because the MDI form is closing.
  162.                 Case vbFormOwner
  163.                          '5 A form is closing because its owner is closing
  164.             End Select
  165.             Exit Sub
  166.             
  167. ErrLine:
  168.             Err.Clear
  169.             Exit Sub
  170.             End Sub
  171.             
  172.             
  173.             ' ******************************************************************************************************************************
  174.             ' * procedure name: Form_Unload
  175.             ' * procedure description:  Occurs when a form is about to be removed from the screen.
  176.             ' *
  177.             ' ******************************************************************************************************************************
  178.             Private Sub Form_Unload(Cancel As Integer)
  179.             On Local Error GoTo ErrLine
  180.             With Me
  181.                .Move 0 - (Screen.Width * 8), 0 - (Screen.Height * 8): .Visible = False
  182.             End With
  183.             Exit Sub
  184.             
  185. ErrLine:
  186.             Err.Clear
  187.             Exit Sub
  188.             End Sub
  189. ' **************************************************************************************************************************************
  190. ' * PRIVATE INTERFACE- CONTROL EVENT HANDLERS
  191.             ' ******************************************************************************************************************************
  192.             ' * procedure name: cmdSysInfo_Click
  193.             ' * procedure description:  occures when the 'System Information' command button is pressed
  194.             ' *
  195.             ' ******************************************************************************************************************************
  196.             Private Sub cmdSysInfo_Click()
  197.             Dim bstrSysInfoPath As String
  198.             On Local Error GoTo ErrLine
  199.             
  200.             'query the registry for a path to msinfo.exe, and execute the application for the user
  201.             If Registry_DoesKeyExist(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Shared Tools\MSINFO") Then
  202.                bstrSysInfoPath = Registry_QueryEntryValue(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Shared Tools\MSINFO", "Path", vbNullString)
  203.                
  204.                Call Shell(bstrSysInfoPath, vbNormalFocus)
  205.             End If
  206.             Exit Sub
  207.             
  208. ErrLine:
  209.             Err.Clear
  210.             Exit Sub
  211.             End Sub
  212.             
  213.             
  214.             ' ******************************************************************************************************************************
  215.             ' * procedure name: cmdOK_Click
  216.             ' * procedure description:  occures when the 'ok' command button is pressed
  217.             ' *
  218.             ' ******************************************************************************************************************************
  219.             Private Sub cmdOk_Click()
  220.             On Local Error GoTo ErrLine
  221.             Unload Me
  222.             Exit Sub
  223.             
  224. ErrLine:
  225.             Err.Clear
  226.             Exit Sub
  227.             End Sub
  228.